
package com.bk.model;

import java.util.HashMap;
import java.util.Map;

public class Cart {
	/**
	 * 多个购物项：map的key是 pid map的value是CartItem购物项
	 */
	private Map<String,CartItem> cartItems=new HashMap<>();
	/**
	 *购物车总计
	 */
	private double total;
	public Map<String, CartItem> getCartItems() {
	
		return cartItems;
	}
	public void setCartItems(Map<String, CartItem> cartItems) {
	
		this.cartItems = cartItems;
	}
	public double getTotal() {
	
		return total;
	}
	public void setTotal(double total) {
	
		this.total = total;
	}
	@Override
	public String toString() {
		return "Cart [total=" + total + "]";
	}
	public Cart(Map<String, CartItem> cartItems, double total) {
		super();
		this.cartItems = cartItems;
		this.total = total;
	}
	public Cart() {
		
		super();
		//TODO 
			
	}
	
	
	

}

	